﻿#parse("partials/header.html") #parse("partials/sidebar.html")
<script>
    jQuery(document).ready(function () {
        jQuery("#mws-validate-admins").submit(
            function () {
                if (jQuery("#mws-validate-admins").valid() == true) {
                    jQuery.blockUI();
                    var post_data = jQuery(this).serialize();
                    var form_action = jQuery(this).attr("action");
                    var form_method = jQuery(this).attr("method");
                    jQuery.ajax({
                        type: form_method,
                        url: form_action,
                        cache: false,
                        dataType: "json",
                        data: post_data,
                        success: function (data) {
                            jQuery("#notif").html(data['strNotification']);
                            jQuery.unblockUI();
                        },
                        error: function (data) {
                            jQuery.unblockUI();
                        },
                        complete: function () {

                        }
                    });
                }
                return false;
            });
        $("#IdGroupSpecialist").change(function () {
            var parentId = $(this).val();

            $("#SpecialistId option").each(function () {
                var data = $(this).attr("idparent");

                if (data == parentId || data == 0) {
                    $(this).show();
                }
                else {
                    $(this).hide();
                }
            });
            $("#SpecialistId").val(0);


        });
        $("#SpecialistId").change(function () {
            var parentIdSub = $(this).val();

            $("#SubSpecialistId option").each(function () {
                var data = $(this).attr("idParent");

                if (data == parentIdSub || data == 0) {
                    $(this).show();
                }
                else {
                    $(this).hide();
                }
            });
            $("#SubSpecialistId").val(0);
        });
    });

    function OpenPopUp(url) {
        $("#mws-form-dialog").dialog("open");
        var id = jQuery("#Id").val();
        $("#modalIframeForm").attr("src", "/master/doctors/searchemployee/");
        return false;
    }
    function SetEmployee(idParam, nameParam) {
        $("#IdEmployee").val(idParam);
        $("#FullName").val(nameParam);
        $("#modalIframeForm").attr("src", "");
        $("#mws-form-dialog").dialog("close");
        return false;
    }

</script>
   <style>
    div#datalist_filter 
    {
        display:none;
    }
    div#datalist_length 
    {
        display:none;
    }
    .mws-table thead 
    {
        margin-top:-10px;
    }
</style>
<div id="mws-container" class="clearfix">
    <!-- Inner Container Start -->
    <div class="container">
    <div class="mws-panel grid_8">
            <div class="mws-panel-header">
                <span class="mws-i-24 i-table-1">Doctor</span>
            </div>
            <div class="mws-panel-body">
                <div class="mws-panel-toolbar top clearfix">
                    <ul>
                    <!--<li><a class="mws-ic-16 ic-add" href="/master/doctors/createdoctor/" title="Accept">
                            Add Doctor</a></li>-->
                        <li><a class="mws-ic-16 ic-arrow-left" href="/master/doctors/" title="Accept">Back to List
                            Doctor</a></li>
                    </ul>
                </div>
                <div id="notif">
                    $Notification
                </div>

               <div class="mws-form" action="#">
                    <div class="mws-form-inline">
                    <form method="post" action="/master/doctors/savedoctorcode/" id="mws-validate-admins"
                        class="crud">
                        <input type="hidden" value="$IsCreate" name="IsCreate" id="IsCreate" />
                        <input type="hidden" value="$doctor.Id" name="Id" id="Id" />
                        <input type="hidden" value="$doctor.EmployeeId" name="EmpId" id="EmpId" />
                        <div class="mws-form-row">
                                <label>
                                    Doctor Code
                                </label>
                               
                                <div class="mws-form-item large">
                                    <div class="mws-form-cols clearfix">
                                        <div class="mws-form-col-2-8 alpha">
                                            <div class="mws-form-item">
                                               <input class="required text-input, lf mws-textinput" id="CodeValue" name="CodeValue"
                                        type="text" value="$doctor.CodeValue" disabled="disabled" />
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <label>
                                    Employee Number</label>
                                <div class="mws-form-item">
                                    <div class="mws-form-cols clearfix">
                                        <div class="mws-form-col-3-8 alpha">
                                            <div class="mws-form-item">
                                                <input id="FullName" name="FullName" value="" type="text" class="mws-textinput" readonly="readonly" />
                                                <input type="hidden" value="$empId" name="EmployeeId" id="EmployeeId" />
                                            </div>
                                        </div>
                                        <div class="mws-form-col-2-8">
                                            <div class="mws-form-item">
                                                <input type="button" class="mws-button green small ButtonSearchPresentArea" addresstype="present" name="ButtonSearchPresentArea" value="search" onclick="OpenPopUp()" id="search"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <label>
                                    Employee Name
                                </label>
                               
                                <div class="mws-form-item large">
                                    <div class="mws-form-cols clearfix">
                                        <div class="mws-form-col-2-8 alpha">
                                            <div class="mws-form-item">
                                               <input class="required text-input, lf mws-textinput" id="EmpName" name="CodeValue"
                                        type="text" value="$doctor.CodeValue" disabled="disabled" />
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            <label>
                                Group Specialist</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-3-8 alpha">
                                        <div class="mws-form-item">
                                             $ddlEditGroupSpecialist
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>
                                Specialist</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-3-8 alpha">
                                        <div class="mws-form-item">
                                            $ddlEditSpecialist 
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>
                                SubSpecialist</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-3-8 alpha">
                                        <div class="mws-form-item">
                                             $ddlEditSubSpecialist
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-inline">
                            <div class="mws-form-row">
                                <br />
                                <span style="color: #FF0000; font-size: large;">*</span><span style="color: #FF0000;">
                                    : Mandatory</span>
                            </div>
                        </div>
                       <div class="mws-button-row">
                        <input name="btnAction" class="mws-button red" type="submit" value="Save" />
                        <input class="mws-button gray" type="reset" value="Reset" />
                    </div>
                     </form>
                        </div>
                            
                   
                   
                </div>
                
            </div>
        </div>
        <!-- Panels End -->
    </div>
    <!-- Inner Container End -->
</div>
#parse("partials/footer.html")

